/**
 * 
 */
package com.wolfpire.info.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.wolfpire.info.dao.InformationCountInfoDao;
import com.wolfpire.info.model.InformationCountInfo;
import com.wolfpire.info.service.InformationCountInfoService;
import com.wolfpire.system.common.Constants;
import com.wolfpire.system.common.Page;
import com.wolfpire.system.common.base.dao.IBaseHibernateDao;
import com.wolfpire.system.common.base.service.impl.BaseHibernateService;

/**
 * @author lihd
 *
 */

@Service("informationCountInfoService")
public class InformationCountInfoServiceImpl extends
		BaseHibernateService<InformationCountInfo, Long> implements
		InformationCountInfoService {

	@Override
	public List<InformationCountInfo> list(InformationCountInfo informationCountInfo) {
		return this.informationCountInfoDao.list(informationCountInfo);
	}

	@Override
	public void del(Long id) {
		InformationCountInfo informationCountInfo = this.informationCountInfoDao.get(id);
		if (null != informationCountInfo) {
			informationCountInfo.setDelFlag(Constants.DELETE_FLAG);
			this.informationCountInfoDao.saveOrUpdate(informationCountInfo);
		}
		
	}

	@Override
	public Page<InformationCountInfo> setPageDataList(
			Page<InformationCountInfo> page,
			InformationCountInfo filterInformationCountInfo) {
		return this.informationCountInfoDao.findInformationCountInfos(page, filterInformationCountInfo);
	}

	@Override
	protected IBaseHibernateDao<InformationCountInfo, Long> getEntityDao() {
		return this.informationCountInfoDao;
	}
	
	@Resource private InformationCountInfoDao informationCountInfoDao;

}
